package comchifaner.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ListUtil {
	public static String listToJsonString(List<?> list, String tag) {
		if (list != null && list.size() != 0) {
			Map<String, Object> map = new HashMap<String, Object>();
			map.put(tag, list);
			return JsonResult.successWithData(map);
		}
		return JsonResult.emptyFailure();
	}
}
